import { CallSprite } from "./CallSprite";
import { ResouceConst } from "../../../../component/gconst/ResouceConst";
import { GButton } from "../../../../../com/mui/controls/GButton";
import { ObjCreate } from "../../common/ObjCreate";
import { Language } from "../../../../../extend/language/Language";
type int = number;
//class TransSelectPanel
    
    export  class TransSelectPanel extends CallSprite
    {
        constructor()
        {
            super();
            this.initChildren();
            return;
        }

        /* internal  */initChildren(): void
        {
            var loc1=ResouceConst.getScaleBitmap("ToolTipBg");
            loc1.width = 82;
            loc1.height = 4 * 25 + 12;
            this.addChild(loc1);
            this._btnlittleTrans = this.createButton(0, littleTrans);
            this._btnPartTrans = this.createButton(1, partTrans);
            this._btnAllTrans = this.createButton(2, allTrans);
            this._btnHide = this.createButton(3, hidePanel);
            this._btnShow = this.createButton(3, showPanel);
            this._btnShow.visible = false;
            return;
        }

        /* internal  */createButton(arg1: int, arg2: string): GButton
        {
            var loc1=ObjCreate.createGButton(arg2, 6, 5 + arg1 * 25, 70, 24, this, "ButtonMini");
            loc1.addEventListener(flash.events.MouseEvent.CLICK, this.clickHandler);
            return loc1;
        }

        /* internal  */clickHandler(arg1: Object /* flash.events.MouseEvent */): void
        {
            var loc1=arg1.currentTarget as GButton;
            if (loc1 == this._btnHide) 
            {
                this._btnHide.visible = false;
                this._btnShow.visible = true;
            }
            if (loc1 == this._btnShow) 
            {
                this._btnHide.visible = true;
                this._btnShow.visible = false;
            }
            this.callAll(loc1.label);
            return;
        }

        public static get partTrans(): string
        {
            return Language.getString(40671);
        }

        public static get littleTrans(): string
        {
            return Language.getString(40672);
        }

        public static get allTrans(): string
        {
            return Language.getString(40673);
        }

        public static get hidePanel(): string
        {
            return Language.getString(40674);
        }

        public static get showPanel(): string
        {
            return Language.getString(40675);
        }

        /* internal */ /* var */_btnPartTrans: GButton;

        /* internal */ /* var */_btnlittleTrans: GButton;

        /* internal */ /* var */_btnAllTrans: GButton;

        /* internal */ /* var */_btnHide: GButton;

        /* internal */ /* var */_btnShow: GButton;
    }
